home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / msysjour / vol06 / 01 / kermit / wnterm.doc < prev    next >
Text File  |  1990-12-31  |  5KB  |  115 lines

  1.                  WNTERM
  2.  
  3.         A Simple Windows Terminal Program
  4.  
  5.              William S. Hall
  6.              3665 Benton Street, #66
  7.               Santa Clara, CA 95051
  8.  
  9.  
  10.               Introduction
  11.  
  12.      WNTERM is a dumb terminal program written for Microsoft
  13. Windows.  The purpose of the program is educational and it is
  14. distributed with source code.  No attempt has been made to add
  15. features such as memory paging, clipboard data exchange, or smart
  16. terminal emulation.  The primary goal is to show how to use the
  17. Windows communications features and to illustrate subclassing and
  18. font enumeration.  Despite its limitations, the program functions
  19. quite adequately as a means for basic communication with another
  20. computer through the serial port.
  21.  
  22.      WNTERM has a useful option allowing you to choose a font
  23. which will provide the maximum number of visible lines on the
  24. screen.  One possible application is to use WNTERM as a debugging
  25. terminal.  See the sections below on selecting a small font and
  26. the caveats about maximum baud rates.
  27.  
  28.  
  29.             Program Operation
  30.  
  31.      To use the program, copy WNTERM.EXE to an appropriate
  32. directory and run it under Windows.  The program  first tries to
  33. open COM1.  If not successful, it tries successively COM2, COM3,
  34. and COM4.  If this fails, the program exits.  if a port can be
  35. opened, the baud rate, parity, and word size will be set
  36. according to the COMx: strings in the [ports] section of win.ini. 
  37. You should modify these values (use the Control Panel) if to do
  38. so does not interfere with a serial printer setting.  Otherwise,
  39. you can set the desired parameters with the program's
  40. 'Communications' menu after startup.
  41.  
  42.      Before trying to use COM3 or COM4, you must set up the port
  43. addresses used by your hardware.  The entry for COM3 is at 40:6;
  44. COM4 is located at 40:8.  Use DEBUG and the examine command to
  45. enter the values.  Remember that the addresses must be entered in
  46. Intel format (low-order byte first).  Look at the values for COM1
  47. and COM2 found at 40:0 and 40:2 for guidance.  Also, you should
  48. update the equipment word at 40:10, bits 11-9, to show the number
  49. of communications ports your machine has.
  50.  
  51.      WNTERM, when run in Real or Standard mode Windows, will most
  52. likely operate correctly on COM3 or COM4 after you have made the
  53. entries suggested above in the BIOS data area.  On an ISA bus 386
  54. machine, expect complete failure.  You may be successful on an
  55. EISA bus or Microchannel computer.  At this time there seems to
  56. be lots of problems with how Enhanced mode Windows handles COM3
  57. and COM4.  The general rule is: stay with COM1 and COM2.
  58.  
  59.      When the window appears, the program will be ready to
  60. communicate with the port shown in the title bar.  You can switch
  61. between line and local operations by toggling the 'Line/Local'
  62. menu item.  At any time, you can clear the screen with the
  63. 'ClearScreen' menu choice.  If needed, Local Echo can be
  64. selected.  Scrolling can be started and stopped with the Scroll
  65. Lock key.  Finally, a dialog box is provided to allow you to
  66. vary the communications parameters.
  67.  
  68.  
  69.                Using a Small Font
  70.  
  71.      After the program has run for the first time, an entry is
  72. made in win.ini of the form:
  73.  
  74.     [Wnterm]
  75.     SmallFont=0
  76.  
  77. If you change 0 to 1, the program will search all Courier fonts
  78. installed on your system for the one with the smallest height. 
  79. If one is found with a height less than and of width less than or
  80. equal to that of the Windows system font, then the smaller font
  81. will be used.  In this way, it is possible to have more lines on
  82. the screen.  If you install COURA.FON (which is normally copied
  83. to your Windows directory only if you have a CGA, so you may have
  84. to retrieve it from the distribution disks), you can have as many
  85. as 73 lines on a VGA screen and 53 on the EGA.  If no small font
  86. is found, then the system font will be used.  You will then have
  87. a maximum of 29 lines on the VGA and 32 on the EGA.  (The EGA
  88. system font is only 10 pixels high, whereas on the VGA it is 15).
  89.  
  90.  
  91.            Flow Control and Baud Rates
  92.  
  93.      The program needs XON-XOFF on the host side for baud rates
  94. above 2400.  At 2400 baud or below, the performance on a 16 mHz.
  95. 386 machine is adequate for sustained operation without
  96. handshaking at full screen.  You may have to experiment with
  97. machines of lower performance to find the maximum usable baud
  98. rate with no flow control.  Generally this is of no concern
  99. unless the host is incapable of XON-XOFF as might be the case
  100. when WNTERM is being used as a debugging terminal.
  101.  
  102.  
  103.                Source Code
  104.  
  105.      The source code is enclosed on the disk.  If you know
  106. Windows programming, it should not be too difficult to read.
  107. For more information, see the following articles:
  108.  
  109.      1.  A Simple Terminal Program for Windows, Programmer's
  110. Journal 7.6, November/December, 1989, pp. 26-38.
  111.  
  112.      2.  A Simple Terminal Program in Presentation Manager,
  113. Programmer's Journal 7.4, July/August, 1989, pp. 32-43.
  114.  
  115.